<!-- File: /app/View/Users/profile.ctp -->

<h1><?php echo h($users['User']['surname'])?></h1>

<h1><?php echo h($users['User']['name'])?></h1>

<p>Date of birth: <?php echo $users['User']['birthday']?></p>

<p>E-mail: <?php echo h($users['User']['email'])?></p>


<p><?php
if(!empty($users['User']['photo']) && file_exists('img/profile/'.$users['User']['photo']))
	echo $this->Html->image('profile/'.$users['User']['photo'], array('alt'=>'Profile picture', 'url'=>array('controller'=>'users', 'action'=>'add_picture'), 'title'=>$users['User']['surname'].' '.$users['User']['name'].'\'s profile picture', 'style' => 'max-width: 300px; max-height: 300px;'));
else
	echo $this->Html->link('Add a profile picture', array('controller' => 'users', 'action' => 'add_picture'));
?></p>

<?php echo $this->Html->link('Edit your Profile', array('controller' => 'users', 'action' => 'edit_profile', $users['User']['id_user']))?>

<?php //echo $this->Html->link('Create a group', array('controller' => 'groups', 'action' => 'create_group', $users['User']['id_user']))?>
